{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "2a292328",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Map\n",
    "\n",
    "from pyecharts.faker import Faker"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e47a1483",
   "metadata": {},
   "source": [
    "### 地图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "65692db6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['广东', '北京', '上海', '江西', '湖南', '浙江', '江苏']"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Faker.provinces"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "7010081d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['广东省', '北京省', '上海市', '江西省', '湖南省', '浙江省', '江苏省']"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "provinces = [p + \"市\" if p=='上海' else p + \"省\" for p in Faker.provinces]\n",
    "provinces"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "d0b54f5f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'china':'https://assets.pyecharts.org/assets/maps/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"53a32a736bce467cb3fa4971cd12c7ba\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'china'], function(echarts) {\n",
       "                var chart_53a32a736bce467cb3fa4971cd12c7ba = echarts.init(\n",
       "                    document.getElementById('53a32a736bce467cb3fa4971cd12c7ba'), 'white', {renderer: 'canvas'});\n",
       "                var option_53a32a736bce467cb3fa4971cd12c7ba = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"map\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"mapType\": \"china\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u4e1c\\u7701\",\n",
       "                    \"value\": 120\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\\u7701\",\n",
       "                    \"value\": 102\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\\u5e02\",\n",
       "                    \"value\": 80\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u897f\\u7701\",\n",
       "                    \"value\": 118\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5357\\u7701\",\n",
       "                    \"value\": 42\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d59\\u6c5f\\u7701\",\n",
       "                    \"value\": 91\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u82cf\\u7701\",\n",
       "                    \"value\": 45\n",
       "                }\n",
       "            ],\n",
       "            \"roam\": true,\n",
       "            \"aspectScale\": 0.75,\n",
       "            \"nameProperty\": \"name\",\n",
       "            \"selectedMode\": false,\n",
       "            \"zoom\": 1,\n",
       "            \"mapValueCalculation\": \"sum\",\n",
       "            \"showLegendSymbol\": true,\n",
       "            \"emphasis\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5730\\u56fe\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"piecewise\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 200,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 14,\n",
       "        \"borderWidth\": 0\n",
       "    }\n",
       "};\n",
       "                chart_53a32a736bce467cb3fa4971cd12c7ba.setOption(option_53a32a736bce467cb3fa4971cd12c7ba);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x2378b0c6b50>"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c = (\n",
    "    Map()\n",
    "    .add(\n",
    "        '',\n",
    "        [list(i) for i in zip(provinces, Faker.values())],\n",
    "        'china'  # 地图类型\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title='地图'),\n",
    "        visualmap_opts=opts.VisualMapOpts(\n",
    "            max_=200,\n",
    "            is_piecewise=True\n",
    "        )\n",
    "    )\n",
    ")\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5149e80a",
   "metadata": {},
   "source": [
    "### 广东地图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "05406fc5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['汕头市', '汕尾市', '揭阳市', '阳江市', '肇庆市', '广州市', '惠州市']"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Faker.guangdong_city"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "e725e637",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', '广东':'https://assets.pyecharts.org/assets/maps/guangdong'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"f0a257dafbe8485c8dd9df476730bef6\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', '广东'], function(echarts) {\n",
       "                var chart_f0a257dafbe8485c8dd9df476730bef6 = echarts.init(\n",
       "                    document.getElementById('f0a257dafbe8485c8dd9df476730bef6'), 'white', {renderer: 'canvas'});\n",
       "                var option_f0a257dafbe8485c8dd9df476730bef6 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"map\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"mapType\": \"\\u5e7f\\u4e1c\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u6c55\\u5934\\u5e02\",\n",
       "                    \"value\": 110\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c55\\u5c3e\\u5e02\",\n",
       "                    \"value\": 97\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u63ed\\u9633\\u5e02\",\n",
       "                    \"value\": 81\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9633\\u6c5f\\u5e02\",\n",
       "                    \"value\": 59\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8087\\u5e86\\u5e02\",\n",
       "                    \"value\": 126\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u5dde\\u5e02\",\n",
       "                    \"value\": 27\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u60e0\\u5dde\\u5e02\",\n",
       "                    \"value\": 75\n",
       "                }\n",
       "            ],\n",
       "            \"roam\": true,\n",
       "            \"aspectScale\": 0.75,\n",
       "            \"nameProperty\": \"name\",\n",
       "            \"selectedMode\": false,\n",
       "            \"zoom\": 1,\n",
       "            \"mapValueCalculation\": \"sum\",\n",
       "            \"showLegendSymbol\": true,\n",
       "            \"emphasis\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5730\\u56fe\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    }\n",
       "};\n",
       "                chart_f0a257dafbe8485c8dd9df476730bef6.setOption(option_f0a257dafbe8485c8dd9df476730bef6);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x2378ba795e0>"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c = (\n",
    "    Map()\n",
    "    .add(\n",
    "        '',\n",
    "        [list(i) for i in zip(Faker.guangdong_city, Faker.values())],\n",
    "        '广东'  # 地图类型\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title='地图'),\n",
    "        visualmap_opts=opts.VisualMapOpts()\n",
    "    )\n",
    ")\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a336ad17",
   "metadata": {},
   "source": [
    "### 世界地图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "266b5de4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'world':'https://assets.pyecharts.org/assets/maps/world'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"10ffd6b7152b408895028b8d5f89029d\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'world'], function(echarts) {\n",
       "                var chart_10ffd6b7152b408895028b8d5f89029d = echarts.init(\n",
       "                    document.getElementById('10ffd6b7152b408895028b8d5f89029d'), 'white', {renderer: 'canvas'});\n",
       "                var option_10ffd6b7152b408895028b8d5f89029d = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"map\",\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"mapType\": \"world\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"China\",\n",
       "                    \"value\": 132\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Canada\",\n",
       "                    \"value\": 137\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Brazil\",\n",
       "                    \"value\": 113\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Russia\",\n",
       "                    \"value\": 143\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"United States\",\n",
       "                    \"value\": 76\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Africa\",\n",
       "                    \"value\": 88\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Germany\",\n",
       "                    \"value\": 70\n",
       "                }\n",
       "            ],\n",
       "            \"roam\": true,\n",
       "            \"aspectScale\": 0.75,\n",
       "            \"nameProperty\": \"name\",\n",
       "            \"selectedMode\": false,\n",
       "            \"zoom\": 1,\n",
       "            \"mapValueCalculation\": \"sum\",\n",
       "            \"showLegendSymbol\": true,\n",
       "            \"emphasis\": {},\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4e16\\u754c\\u5730\\u56fe\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    }\n",
       "};\n",
       "                chart_10ffd6b7152b408895028b8d5f89029d.setOption(option_10ffd6b7152b408895028b8d5f89029d);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x2378b3be730>"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c = (\n",
    "    Map()\n",
    "    .add(\n",
    "        '',\n",
    "        [list(i) for i in zip(Faker.country, Faker.values())],\n",
    "        'world'  # 地图类型\n",
    "    )\n",
    "    .set_series_opts(\n",
    "        label_opts=opts.LabelOpts(is_show=False)\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title='世界地图'),\n",
    "        visualmap_opts=opts.VisualMapOpts()\n",
    "    )\n",
    ")\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0f5f1efc",
   "metadata": {},
   "source": [
    "### 地球"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "4ac87310",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyecharts.charts import MapGlobe\n",
    "from pyecharts.faker import POPULATION"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "cda6c0e6",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[['Country (or dependency)', 'Population\\n(2019)'],\n",
       " ['China', 1420062022],\n",
       " ['India', 1368737513],\n",
       " ['United States', 329093110],\n",
       " ['Indonesia', 269536482],\n",
       " ['Brazil', 212392717],\n",
       " ['Pakistan', 204596442],\n",
       " ['Nigeria', 200962417],\n",
       " ['Bangladesh', 168065920],\n",
       " ['Russia', 143895551],\n",
       " ['Mexico', 132328035],\n",
       " ['Japan', 126854745],\n",
       " ['Ethiopia', 110135635],\n",
       " ['Philippines', 108106310],\n",
       " ['Egypt', 101168745],\n",
       " ['Vietnam', 97429061],\n",
       " ['DR Congo', 86727573],\n",
       " ['Turkey', 82961805],\n",
       " ['Iran', 82820766],\n",
       " ['Germany', 82438639],\n",
       " ['Thailand', 69306160],\n",
       " ['United Kingdom', 66959016],\n",
       " ['France', 65480710],\n",
       " ['Tanzania', 60913557],\n",
       " ['Italy', 59216525],\n",
       " ['South Africa', 58065097],\n",
       " ['Myanmar', 54336138],\n",
       " ['Kenya', 52214791],\n",
       " ['South Korea', 51339238],\n",
       " ['Colombia', 49849818],\n",
       " ['Spain', 46441049],\n",
       " ['Uganda', 45711874],\n",
       " ['Argentina', 45101781],\n",
       " ['Ukraine', 43795220],\n",
       " ['Algeria', 42679018],\n",
       " ['Sudan', 42514094],\n",
       " ['Iraq', 40412299],\n",
       " ['Poland', 38028278],\n",
       " ['Canada', 37279811],\n",
       " ['Afghanistan', 37209007],\n",
       " ['Morocco', 36635156],\n",
       " ['Saudi Arabia', 34140662],\n",
       " ['Peru', 32933835],\n",
       " ['Uzbekistan', 32807368],\n",
       " ['Venezuela', 32779868],\n",
       " ['Malaysia', 32454455],\n",
       " ['Angola', 31787566],\n",
       " ['Mozambique', 31408823],\n",
       " ['Ghana', 30096970],\n",
       " ['Nepal', 29942018],\n",
       " ['Yemen', 29579986],\n",
       " ['Madagascar', 26969642],\n",
       " ['North Korea', 25727408],\n",
       " [\"Côte d'Ivoire\", 25531083],\n",
       " ['Cameroon', 25312993],\n",
       " ['Australia', 25088636],\n",
       " ['Taiwan', 23758247],\n",
       " ['Niger', 23176691],\n",
       " ['Sri Lanka', 21018859],\n",
       " ['Burkina Faso', 20321560],\n",
       " ['Malawi', 19718743],\n",
       " ['Mali', 19689140],\n",
       " ['Romania', 19483360],\n",
       " ['Kazakhstan', 18592970],\n",
       " ['Syria', 18499181],\n",
       " ['Chile', 18336653],\n",
       " ['Zambia', 18137369],\n",
       " ['Guatemala', 17577842],\n",
       " ['Zimbabwe', 17297495],\n",
       " ['Netherlands', 17132908],\n",
       " ['Ecuador', 17100444],\n",
       " ['Senegal', 16743859],\n",
       " ['Cambodia', 16482646],\n",
       " ['Chad', 15814345],\n",
       " ['Somalia', 15636171],\n",
       " ['Guinea', 13398180],\n",
       " ['South Sudan', 13263184],\n",
       " ['Rwanda', 12794412],\n",
       " ['Benin', 11801595],\n",
       " ['Tunisia', 11783168],\n",
       " ['Burundi', 11575964],\n",
       " ['Belgium', 11562784],\n",
       " ['Cuba', 11492046],\n",
       " ['Bolivia', 11379861],\n",
       " ['Haiti', 11242856],\n",
       " ['Greece', 11124603],\n",
       " ['Dominican Republic', 10996774],\n",
       " ['Czechia', 10630589],\n",
       " ['Portugal', 10254666],\n",
       " ['Jordan', 10069794],\n",
       " ['Sweden', 10053135],\n",
       " ['Azerbaijan', 10014575],\n",
       " ['United Arab Emirates', 9682088],\n",
       " ['Hungary', 9655361],\n",
       " ['Honduras', 9568688],\n",
       " ['Belarus', 9433874],\n",
       " ['Tajikistan', 9292000],\n",
       " ['Austria', 8766201],\n",
       " ['Serbia', 8733407],\n",
       " ['Switzerland', 8608259],\n",
       " ['Papua New Guinea', 8586525],\n",
       " ['Israel', 8583916],\n",
       " ['Togo', 8186384],\n",
       " ['Sierra Leone', 7883123],\n",
       " ['Hong Kong', 7490776],\n",
       " ['Laos', 7064242],\n",
       " ['Bulgaria', 6988739],\n",
       " ['Paraguay', 6981981],\n",
       " ['Libya', 6569864],\n",
       " ['El Salvador', 6445405],\n",
       " ['Nicaragua', 6351157],\n",
       " ['Kyrgyzstan', 6218616],\n",
       " ['Lebanon', 6065922],\n",
       " ['Turkmenistan', 5942561],\n",
       " ['Singapore', 5868104],\n",
       " ['Denmark', 5775224],\n",
       " ['Finland', 5561389],\n",
       " ['Congo', 5542197],\n",
       " ['Slovakia', 5450987],\n",
       " ['Norway', 5400916],\n",
       " ['Eritrea', 5309659],\n",
       " ['State of Palestine', 5186790],\n",
       " ['Oman', 5001875],\n",
       " ['Costa Rica', 4999384],\n",
       " ['Liberia', 4977720],\n",
       " ['Ireland', 4847139],\n",
       " ['Central African Republic', 4825711],\n",
       " ['New Zealand', 4792409],\n",
       " ['Mauritania', 4661149],\n",
       " ['Kuwait', 4248974],\n",
       " ['Panama', 4226197],\n",
       " ['Croatia', 4140148],\n",
       " ['Moldova', 4029750],\n",
       " ['Georgia', 3904204],\n",
       " ['Puerto Rico', 3654978],\n",
       " ['Bosnia and Herzegovina', 3501774],\n",
       " ['Uruguay', 3482156],\n",
       " ['Mongolia', 3166244],\n",
       " ['Albania', 2938428],\n",
       " ['Armenia', 2936706],\n",
       " ['Jamaica', 2906339],\n",
       " ['Lithuania', 2864459],\n",
       " ['Qatar', 2743901],\n",
       " ['Namibia', 2641996],\n",
       " ['Botswana', 2374636],\n",
       " ['Lesotho', 2292682],\n",
       " ['Gambia', 2228075],\n",
       " ['Gabon', 2109099],\n",
       " ['North Macedonia', 2086720],\n",
       " ['Slovenia', 2081900],\n",
       " ['Guinea-Bissau', 1953723],\n",
       " ['Latvia', 1911108],\n",
       " ['Bahrain', 1637896],\n",
       " ['Swaziland', 1415414],\n",
       " ['Trinidad and Tobago', 1375443],\n",
       " ['Equatorial Guinea', 1360104],\n",
       " ['Timor-Leste', 1352360],\n",
       " ['Estonia', 1303798],\n",
       " ['Mauritius', 1271368],\n",
       " ['Cyprus', 1198427],\n",
       " ['Djibouti', 985690],\n",
       " ['Fiji', 918757],\n",
       " ['Réunion', 889918],\n",
       " ['Comoros', 850910],\n",
       " ['Bhutan', 826229],\n",
       " ['Guyana', 786508],\n",
       " ['Macao', 642090],\n",
       " ['Solomon Islands', 635254],\n",
       " ['Montenegro', 629355],\n",
       " ['Luxembourg', 596992],\n",
       " ['Western Sahara', 582478],\n",
       " ['Suriname', 573085],\n",
       " ['Cabo Verde', 560349],\n",
       " ['Micronesia', 536579],\n",
       " ['Maldives', 451738],\n",
       " ['Guadeloupe', 448798],\n",
       " ['Brunei', 439336],\n",
       " ['Malta', 433245],\n",
       " ['Bahamas', 403095],\n",
       " ['Belize', 390231],\n",
       " ['Martinique', 385320],\n",
       " ['Iceland', 340566],\n",
       " ['French Guiana', 296847],\n",
       " ['French Polynesia', 288506],\n",
       " ['Vanuatu', 288017],\n",
       " ['Barbados', 287010],\n",
       " ['New Caledonia', 283376],\n",
       " ['Mayotte', 266380],\n",
       " ['Sao Tome & Principe', 213379],\n",
       " ['Samoa', 198909],\n",
       " ['Saint Lucia', 180454],\n",
       " ['Guam', 167245],\n",
       " ['Channel Islands', 166828],\n",
       " ['Curaçao', 162547],\n",
       " ['Kiribati', 120428],\n",
       " ['St. Vincent & Grenadines', 110488],\n",
       " ['Tonga', 110041],\n",
       " ['Grenada', 108825],\n",
       " ['Aruba', 106053],\n",
       " ['U.S. Virgin Islands', 104909],\n",
       " ['Antigua and Barbuda', 104084],\n",
       " ['Seychelles', 95702],\n",
       " ['Isle of Man', 85369],\n",
       " ['Andorra', 77072],\n",
       " ['Dominica', 74679],\n",
       " ['Cayman Islands', 63129],\n",
       " ['Bermuda', 60833],\n",
       " ['Greenland', 56673],\n",
       " ['Saint Kitts & Nevis', 56345],\n",
       " ['American Samoa', 55727],\n",
       " ['Northern Mariana Islands', 55246],\n",
       " ['Marshall Islands', 53211],\n",
       " ['Faeroe Islands', 49692],\n",
       " ['Sint Maarten', 40939],\n",
       " ['Monaco', 39102],\n",
       " ['Liechtenstein', 38404],\n",
       " ['Turks and Caicos', 36461],\n",
       " ['Gibraltar', 34879],\n",
       " ['San Marino', 33683],\n",
       " ['British Virgin Islands', 32206],\n",
       " ['Caribbean Netherlands', 25971],\n",
       " ['Palau', 22206],\n",
       " ['Cook Islands', 17462],\n",
       " ['Anguilla', 15174],\n",
       " ['Wallis & Futuna', 11617],\n",
       " ['Tuvalu', 11393],\n",
       " ['Nauru', 11260],\n",
       " ['Saint Pierre & Miquelon', 6375],\n",
       " ['Montserrat', 5220],\n",
       " ['Saint Helena', 4096],\n",
       " ['Falkland Islands', 2921],\n",
       " ['Niue', 1628],\n",
       " ['Tokelau', 1340],\n",
       " ['Holy See', 799]]"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "POPULATION"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "1f7659f0",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[['China', 1420062022],\n",
       " ['India', 1368737513],\n",
       " ['United States', 329093110],\n",
       " ['Indonesia', 269536482],\n",
       " ['Brazil', 212392717],\n",
       " ['Pakistan', 204596442],\n",
       " ['Nigeria', 200962417],\n",
       " ['Bangladesh', 168065920],\n",
       " ['Russia', 143895551],\n",
       " ['Mexico', 132328035],\n",
       " ['Japan', 126854745],\n",
       " ['Ethiopia', 110135635],\n",
       " ['Philippines', 108106310],\n",
       " ['Egypt', 101168745],\n",
       " ['Vietnam', 97429061],\n",
       " ['DR Congo', 86727573],\n",
       " ['Turkey', 82961805],\n",
       " ['Iran', 82820766],\n",
       " ['Germany', 82438639],\n",
       " ['Thailand', 69306160],\n",
       " ['United Kingdom', 66959016],\n",
       " ['France', 65480710],\n",
       " ['Tanzania', 60913557],\n",
       " ['Italy', 59216525],\n",
       " ['South Africa', 58065097],\n",
       " ['Myanmar', 54336138],\n",
       " ['Kenya', 52214791],\n",
       " ['South Korea', 51339238],\n",
       " ['Colombia', 49849818],\n",
       " ['Spain', 46441049],\n",
       " ['Uganda', 45711874],\n",
       " ['Argentina', 45101781],\n",
       " ['Ukraine', 43795220],\n",
       " ['Algeria', 42679018],\n",
       " ['Sudan', 42514094],\n",
       " ['Iraq', 40412299],\n",
       " ['Poland', 38028278],\n",
       " ['Canada', 37279811],\n",
       " ['Afghanistan', 37209007],\n",
       " ['Morocco', 36635156],\n",
       " ['Saudi Arabia', 34140662],\n",
       " ['Peru', 32933835],\n",
       " ['Uzbekistan', 32807368],\n",
       " ['Venezuela', 32779868],\n",
       " ['Malaysia', 32454455],\n",
       " ['Angola', 31787566],\n",
       " ['Mozambique', 31408823],\n",
       " ['Ghana', 30096970],\n",
       " ['Nepal', 29942018],\n",
       " ['Yemen', 29579986],\n",
       " ['Madagascar', 26969642],\n",
       " ['North Korea', 25727408],\n",
       " [\"Côte d'Ivoire\", 25531083],\n",
       " ['Cameroon', 25312993],\n",
       " ['Australia', 25088636],\n",
       " ['Taiwan', 23758247],\n",
       " ['Niger', 23176691],\n",
       " ['Sri Lanka', 21018859],\n",
       " ['Burkina Faso', 20321560],\n",
       " ['Malawi', 19718743],\n",
       " ['Mali', 19689140],\n",
       " ['Romania', 19483360],\n",
       " ['Kazakhstan', 18592970],\n",
       " ['Syria', 18499181],\n",
       " ['Chile', 18336653],\n",
       " ['Zambia', 18137369],\n",
       " ['Guatemala', 17577842],\n",
       " ['Zimbabwe', 17297495],\n",
       " ['Netherlands', 17132908],\n",
       " ['Ecuador', 17100444],\n",
       " ['Senegal', 16743859],\n",
       " ['Cambodia', 16482646],\n",
       " ['Chad', 15814345],\n",
       " ['Somalia', 15636171],\n",
       " ['Guinea', 13398180],\n",
       " ['South Sudan', 13263184],\n",
       " ['Rwanda', 12794412],\n",
       " ['Benin', 11801595],\n",
       " ['Tunisia', 11783168],\n",
       " ['Burundi', 11575964],\n",
       " ['Belgium', 11562784],\n",
       " ['Cuba', 11492046],\n",
       " ['Bolivia', 11379861],\n",
       " ['Haiti', 11242856],\n",
       " ['Greece', 11124603],\n",
       " ['Dominican Republic', 10996774],\n",
       " ['Czechia', 10630589],\n",
       " ['Portugal', 10254666],\n",
       " ['Jordan', 10069794],\n",
       " ['Sweden', 10053135],\n",
       " ['Azerbaijan', 10014575],\n",
       " ['United Arab Emirates', 9682088],\n",
       " ['Hungary', 9655361],\n",
       " ['Honduras', 9568688],\n",
       " ['Belarus', 9433874],\n",
       " ['Tajikistan', 9292000],\n",
       " ['Austria', 8766201],\n",
       " ['Serbia', 8733407],\n",
       " ['Switzerland', 8608259],\n",
       " ['Papua New Guinea', 8586525],\n",
       " ['Israel', 8583916],\n",
       " ['Togo', 8186384],\n",
       " ['Sierra Leone', 7883123],\n",
       " ['Hong Kong', 7490776],\n",
       " ['Laos', 7064242],\n",
       " ['Bulgaria', 6988739],\n",
       " ['Paraguay', 6981981],\n",
       " ['Libya', 6569864],\n",
       " ['El Salvador', 6445405],\n",
       " ['Nicaragua', 6351157],\n",
       " ['Kyrgyzstan', 6218616],\n",
       " ['Lebanon', 6065922],\n",
       " ['Turkmenistan', 5942561],\n",
       " ['Singapore', 5868104],\n",
       " ['Denmark', 5775224],\n",
       " ['Finland', 5561389],\n",
       " ['Congo', 5542197],\n",
       " ['Slovakia', 5450987],\n",
       " ['Norway', 5400916],\n",
       " ['Eritrea', 5309659],\n",
       " ['State of Palestine', 5186790],\n",
       " ['Oman', 5001875],\n",
       " ['Costa Rica', 4999384],\n",
       " ['Liberia', 4977720],\n",
       " ['Ireland', 4847139],\n",
       " ['Central African Republic', 4825711],\n",
       " ['New Zealand', 4792409],\n",
       " ['Mauritania', 4661149],\n",
       " ['Kuwait', 4248974],\n",
       " ['Panama', 4226197],\n",
       " ['Croatia', 4140148],\n",
       " ['Moldova', 4029750],\n",
       " ['Georgia', 3904204],\n",
       " ['Puerto Rico', 3654978],\n",
       " ['Bosnia and Herzegovina', 3501774],\n",
       " ['Uruguay', 3482156],\n",
       " ['Mongolia', 3166244],\n",
       " ['Albania', 2938428],\n",
       " ['Armenia', 2936706],\n",
       " ['Jamaica', 2906339],\n",
       " ['Lithuania', 2864459],\n",
       " ['Qatar', 2743901],\n",
       " ['Namibia', 2641996],\n",
       " ['Botswana', 2374636],\n",
       " ['Lesotho', 2292682],\n",
       " ['Gambia', 2228075],\n",
       " ['Gabon', 2109099],\n",
       " ['North Macedonia', 2086720],\n",
       " ['Slovenia', 2081900],\n",
       " ['Guinea-Bissau', 1953723],\n",
       " ['Latvia', 1911108],\n",
       " ['Bahrain', 1637896],\n",
       " ['Swaziland', 1415414],\n",
       " ['Trinidad and Tobago', 1375443],\n",
       " ['Equatorial Guinea', 1360104],\n",
       " ['Timor-Leste', 1352360],\n",
       " ['Estonia', 1303798],\n",
       " ['Mauritius', 1271368],\n",
       " ['Cyprus', 1198427],\n",
       " ['Djibouti', 985690],\n",
       " ['Fiji', 918757],\n",
       " ['Réunion', 889918],\n",
       " ['Comoros', 850910],\n",
       " ['Bhutan', 826229],\n",
       " ['Guyana', 786508],\n",
       " ['Macao', 642090],\n",
       " ['Solomon Islands', 635254],\n",
       " ['Montenegro', 629355],\n",
       " ['Luxembourg', 596992],\n",
       " ['Western Sahara', 582478],\n",
       " ['Suriname', 573085],\n",
       " ['Cabo Verde', 560349],\n",
       " ['Micronesia', 536579],\n",
       " ['Maldives', 451738],\n",
       " ['Guadeloupe', 448798],\n",
       " ['Brunei', 439336],\n",
       " ['Malta', 433245],\n",
       " ['Bahamas', 403095],\n",
       " ['Belize', 390231],\n",
       " ['Martinique', 385320],\n",
       " ['Iceland', 340566],\n",
       " ['French Guiana', 296847],\n",
       " ['French Polynesia', 288506],\n",
       " ['Vanuatu', 288017],\n",
       " ['Barbados', 287010],\n",
       " ['New Caledonia', 283376],\n",
       " ['Mayotte', 266380],\n",
       " ['Sao Tome & Principe', 213379],\n",
       " ['Samoa', 198909],\n",
       " ['Saint Lucia', 180454],\n",
       " ['Guam', 167245],\n",
       " ['Channel Islands', 166828],\n",
       " ['Curaçao', 162547],\n",
       " ['Kiribati', 120428],\n",
       " ['St. Vincent & Grenadines', 110488],\n",
       " ['Tonga', 110041],\n",
       " ['Grenada', 108825],\n",
       " ['Aruba', 106053],\n",
       " ['U.S. Virgin Islands', 104909],\n",
       " ['Antigua and Barbuda', 104084],\n",
       " ['Seychelles', 95702],\n",
       " ['Isle of Man', 85369],\n",
       " ['Andorra', 77072],\n",
       " ['Dominica', 74679],\n",
       " ['Cayman Islands', 63129],\n",
       " ['Bermuda', 60833],\n",
       " ['Greenland', 56673],\n",
       " ['Saint Kitts & Nevis', 56345],\n",
       " ['American Samoa', 55727],\n",
       " ['Northern Mariana Islands', 55246],\n",
       " ['Marshall Islands', 53211],\n",
       " ['Faeroe Islands', 49692],\n",
       " ['Sint Maarten', 40939],\n",
       " ['Monaco', 39102],\n",
       " ['Liechtenstein', 38404],\n",
       " ['Turks and Caicos', 36461],\n",
       " ['Gibraltar', 34879],\n",
       " ['San Marino', 33683],\n",
       " ['British Virgin Islands', 32206],\n",
       " ['Caribbean Netherlands', 25971],\n",
       " ['Palau', 22206],\n",
       " ['Cook Islands', 17462],\n",
       " ['Anguilla', 15174],\n",
       " ['Wallis & Futuna', 11617],\n",
       " ['Tuvalu', 11393],\n",
       " ['Nauru', 11260],\n",
       " ['Saint Pierre & Miquelon', 6375],\n",
       " ['Montserrat', 5220],\n",
       " ['Saint Helena', 4096],\n",
       " ['Falkland Islands', 2921],\n",
       " ['Niue', 1628],\n",
       " ['Tokelau', 1340],\n",
       " ['Holy See', 799]]"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 所有人口数据\n",
    "POPULATION[1:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "5582d9fb",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[1420062022,\n",
       " 1368737513,\n",
       " 329093110,\n",
       " 269536482,\n",
       " 212392717,\n",
       " 204596442,\n",
       " 200962417,\n",
       " 168065920,\n",
       " 143895551,\n",
       " 132328035,\n",
       " 126854745,\n",
       " 110135635,\n",
       " 108106310,\n",
       " 101168745,\n",
       " 97429061,\n",
       " 86727573,\n",
       " 82961805,\n",
       " 82820766,\n",
       " 82438639,\n",
       " 69306160,\n",
       " 66959016,\n",
       " 65480710,\n",
       " 60913557,\n",
       " 59216525,\n",
       " 58065097,\n",
       " 54336138,\n",
       " 52214791,\n",
       " 51339238,\n",
       " 49849818,\n",
       " 46441049,\n",
       " 45711874,\n",
       " 45101781,\n",
       " 43795220,\n",
       " 42679018,\n",
       " 42514094,\n",
       " 40412299,\n",
       " 38028278,\n",
       " 37279811,\n",
       " 37209007,\n",
       " 36635156,\n",
       " 34140662,\n",
       " 32933835,\n",
       " 32807368,\n",
       " 32779868,\n",
       " 32454455,\n",
       " 31787566,\n",
       " 31408823,\n",
       " 30096970,\n",
       " 29942018,\n",
       " 29579986,\n",
       " 26969642,\n",
       " 25727408,\n",
       " 25531083,\n",
       " 25312993,\n",
       " 25088636,\n",
       " 23758247,\n",
       " 23176691,\n",
       " 21018859,\n",
       " 20321560,\n",
       " 19718743,\n",
       " 19689140,\n",
       " 19483360,\n",
       " 18592970,\n",
       " 18499181,\n",
       " 18336653,\n",
       " 18137369,\n",
       " 17577842,\n",
       " 17297495,\n",
       " 17132908,\n",
       " 17100444,\n",
       " 16743859,\n",
       " 16482646,\n",
       " 15814345,\n",
       " 15636171,\n",
       " 13398180,\n",
       " 13263184,\n",
       " 12794412,\n",
       " 11801595,\n",
       " 11783168,\n",
       " 11575964,\n",
       " 11562784,\n",
       " 11492046,\n",
       " 11379861,\n",
       " 11242856,\n",
       " 11124603,\n",
       " 10996774,\n",
       " 10630589,\n",
       " 10254666,\n",
       " 10069794,\n",
       " 10053135,\n",
       " 10014575,\n",
       " 9682088,\n",
       " 9655361,\n",
       " 9568688,\n",
       " 9433874,\n",
       " 9292000,\n",
       " 8766201,\n",
       " 8733407,\n",
       " 8608259,\n",
       " 8586525,\n",
       " 8583916,\n",
       " 8186384,\n",
       " 7883123,\n",
       " 7490776,\n",
       " 7064242,\n",
       " 6988739,\n",
       " 6981981,\n",
       " 6569864,\n",
       " 6445405,\n",
       " 6351157,\n",
       " 6218616,\n",
       " 6065922,\n",
       " 5942561,\n",
       " 5868104,\n",
       " 5775224,\n",
       " 5561389,\n",
       " 5542197,\n",
       " 5450987,\n",
       " 5400916,\n",
       " 5309659,\n",
       " 5186790,\n",
       " 5001875,\n",
       " 4999384,\n",
       " 4977720,\n",
       " 4847139,\n",
       " 4825711,\n",
       " 4792409,\n",
       " 4661149,\n",
       " 4248974,\n",
       " 4226197,\n",
       " 4140148,\n",
       " 4029750,\n",
       " 3904204,\n",
       " 3654978,\n",
       " 3501774,\n",
       " 3482156,\n",
       " 3166244,\n",
       " 2938428,\n",
       " 2936706,\n",
       " 2906339,\n",
       " 2864459,\n",
       " 2743901,\n",
       " 2641996,\n",
       " 2374636,\n",
       " 2292682,\n",
       " 2228075,\n",
       " 2109099,\n",
       " 2086720,\n",
       " 2081900,\n",
       " 1953723,\n",
       " 1911108,\n",
       " 1637896,\n",
       " 1415414,\n",
       " 1375443,\n",
       " 1360104,\n",
       " 1352360,\n",
       " 1303798,\n",
       " 1271368,\n",
       " 1198427,\n",
       " 985690,\n",
       " 918757,\n",
       " 889918,\n",
       " 850910,\n",
       " 826229,\n",
       " 786508,\n",
       " 642090,\n",
       " 635254,\n",
       " 629355,\n",
       " 596992,\n",
       " 582478,\n",
       " 573085,\n",
       " 560349,\n",
       " 536579,\n",
       " 451738,\n",
       " 448798,\n",
       " 439336,\n",
       " 433245,\n",
       " 403095,\n",
       " 390231,\n",
       " 385320,\n",
       " 340566,\n",
       " 296847,\n",
       " 288506,\n",
       " 288017,\n",
       " 287010,\n",
       " 283376,\n",
       " 266380,\n",
       " 213379,\n",
       " 198909,\n",
       " 180454,\n",
       " 167245,\n",
       " 166828,\n",
       " 162547,\n",
       " 120428,\n",
       " 110488,\n",
       " 110041,\n",
       " 108825,\n",
       " 106053,\n",
       " 104909,\n",
       " 104084,\n",
       " 95702,\n",
       " 85369,\n",
       " 77072,\n",
       " 74679,\n",
       " 63129,\n",
       " 60833,\n",
       " 56673,\n",
       " 56345,\n",
       " 55727,\n",
       " 55246,\n",
       " 53211,\n",
       " 49692,\n",
       " 40939,\n",
       " 39102,\n",
       " 38404,\n",
       " 36461,\n",
       " 34879,\n",
       " 33683,\n",
       " 32206,\n",
       " 25971,\n",
       " 22206,\n",
       " 17462,\n",
       " 15174,\n",
       " 11617,\n",
       " 11393,\n",
       " 11260,\n",
       " 6375,\n",
       " 5220,\n",
       " 4096,\n",
       " 2921,\n",
       " 1628,\n",
       " 1340,\n",
       " 799]"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = [x for _,x in POPULATION[1:]]\n",
    "data  # 人口"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "57066df2",
   "metadata": {},
   "outputs": [],
   "source": [
    "low, high = min(data), max(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "ebdb5f76",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(799, 1420062022)"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "low, high"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "3cf4307c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'echarts-gl':'https://assets.pyecharts.org/assets/echarts-gl.min', 'china':'https://assets.pyecharts.org/assets/maps/china', 'world':'https://assets.pyecharts.org/assets/maps/world'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "    <div id=\"668416b569964732b2e8872cf0e397b9\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts', 'echarts-gl', 'china', 'world'], function(echarts) {\n",
       "\t\tvar canvas_668416b569964732b2e8872cf0e397b9 = document.createElement('canvas');\n",
       "        var mapChart_668416b569964732b2e8872cf0e397b9 = echarts.init(\n",
       "\t    canvas_668416b569964732b2e8872cf0e397b9, 'white', {width: 4096, height: 2048, renderer: 'canvas'});\n",
       "        var mapOption_668416b569964732b2e8872cf0e397b9 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"map\",\n",
       "            \"name\": \"\\u4e16\\u754c\\u4eba\\u53e3\",\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"mapType\": \"world\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"China\",\n",
       "                    \"value\": 1420062022\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"India\",\n",
       "                    \"value\": 1368737513\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"United States\",\n",
       "                    \"value\": 329093110\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Indonesia\",\n",
       "                    \"value\": 269536482\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Brazil\",\n",
       "                    \"value\": 212392717\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Pakistan\",\n",
       "                    \"value\": 204596442\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Nigeria\",\n",
       "                    \"value\": 200962417\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bangladesh\",\n",
       "                    \"value\": 168065920\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Russia\",\n",
       "                    \"value\": 143895551\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Mexico\",\n",
       "                    \"value\": 132328035\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Japan\",\n",
       "                    \"value\": 126854745\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Ethiopia\",\n",
       "                    \"value\": 110135635\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Philippines\",\n",
       "                    \"value\": 108106310\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Egypt\",\n",
       "                    \"value\": 101168745\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Vietnam\",\n",
       "                    \"value\": 97429061\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"DR Congo\",\n",
       "                    \"value\": 86727573\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Turkey\",\n",
       "                    \"value\": 82961805\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Iran\",\n",
       "                    \"value\": 82820766\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Germany\",\n",
       "                    \"value\": 82438639\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Thailand\",\n",
       "                    \"value\": 69306160\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"United Kingdom\",\n",
       "                    \"value\": 66959016\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"France\",\n",
       "                    \"value\": 65480710\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Tanzania\",\n",
       "                    \"value\": 60913557\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Italy\",\n",
       "                    \"value\": 59216525\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"South Africa\",\n",
       "                    \"value\": 58065097\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Myanmar\",\n",
       "                    \"value\": 54336138\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Kenya\",\n",
       "                    \"value\": 52214791\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"South Korea\",\n",
       "                    \"value\": 51339238\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Colombia\",\n",
       "                    \"value\": 49849818\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Spain\",\n",
       "                    \"value\": 46441049\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Uganda\",\n",
       "                    \"value\": 45711874\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Argentina\",\n",
       "                    \"value\": 45101781\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Ukraine\",\n",
       "                    \"value\": 43795220\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Algeria\",\n",
       "                    \"value\": 42679018\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Sudan\",\n",
       "                    \"value\": 42514094\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Iraq\",\n",
       "                    \"value\": 40412299\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Poland\",\n",
       "                    \"value\": 38028278\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Canada\",\n",
       "                    \"value\": 37279811\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Afghanistan\",\n",
       "                    \"value\": 37209007\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Morocco\",\n",
       "                    \"value\": 36635156\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Saudi Arabia\",\n",
       "                    \"value\": 34140662\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Peru\",\n",
       "                    \"value\": 32933835\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Uzbekistan\",\n",
       "                    \"value\": 32807368\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Venezuela\",\n",
       "                    \"value\": 32779868\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Malaysia\",\n",
       "                    \"value\": 32454455\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Angola\",\n",
       "                    \"value\": 31787566\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Mozambique\",\n",
       "                    \"value\": 31408823\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Ghana\",\n",
       "                    \"value\": 30096970\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Nepal\",\n",
       "                    \"value\": 29942018\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Yemen\",\n",
       "                    \"value\": 29579986\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Madagascar\",\n",
       "                    \"value\": 26969642\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"North Korea\",\n",
       "                    \"value\": 25727408\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"C\\u00f4te d'Ivoire\",\n",
       "                    \"value\": 25531083\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cameroon\",\n",
       "                    \"value\": 25312993\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Australia\",\n",
       "                    \"value\": 25088636\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Taiwan\",\n",
       "                    \"value\": 23758247\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Niger\",\n",
       "                    \"value\": 23176691\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Sri Lanka\",\n",
       "                    \"value\": 21018859\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Burkina Faso\",\n",
       "                    \"value\": 20321560\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Malawi\",\n",
       "                    \"value\": 19718743\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Mali\",\n",
       "                    \"value\": 19689140\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Romania\",\n",
       "                    \"value\": 19483360\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Kazakhstan\",\n",
       "                    \"value\": 18592970\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Syria\",\n",
       "                    \"value\": 18499181\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Chile\",\n",
       "                    \"value\": 18336653\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Zambia\",\n",
       "                    \"value\": 18137369\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Guatemala\",\n",
       "                    \"value\": 17577842\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Zimbabwe\",\n",
       "                    \"value\": 17297495\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Netherlands\",\n",
       "                    \"value\": 17132908\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Ecuador\",\n",
       "                    \"value\": 17100444\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Senegal\",\n",
       "                    \"value\": 16743859\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cambodia\",\n",
       "                    \"value\": 16482646\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Chad\",\n",
       "                    \"value\": 15814345\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Somalia\",\n",
       "                    \"value\": 15636171\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Guinea\",\n",
       "                    \"value\": 13398180\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"South Sudan\",\n",
       "                    \"value\": 13263184\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Rwanda\",\n",
       "                    \"value\": 12794412\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Benin\",\n",
       "                    \"value\": 11801595\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Tunisia\",\n",
       "                    \"value\": 11783168\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Burundi\",\n",
       "                    \"value\": 11575964\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Belgium\",\n",
       "                    \"value\": 11562784\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cuba\",\n",
       "                    \"value\": 11492046\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bolivia\",\n",
       "                    \"value\": 11379861\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Haiti\",\n",
       "                    \"value\": 11242856\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Greece\",\n",
       "                    \"value\": 11124603\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Dominican Republic\",\n",
       "                    \"value\": 10996774\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Czechia\",\n",
       "                    \"value\": 10630589\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Portugal\",\n",
       "                    \"value\": 10254666\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Jordan\",\n",
       "                    \"value\": 10069794\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Sweden\",\n",
       "                    \"value\": 10053135\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Azerbaijan\",\n",
       "                    \"value\": 10014575\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"United Arab Emirates\",\n",
       "                    \"value\": 9682088\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Hungary\",\n",
       "                    \"value\": 9655361\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Honduras\",\n",
       "                    \"value\": 9568688\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Belarus\",\n",
       "                    \"value\": 9433874\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Tajikistan\",\n",
       "                    \"value\": 9292000\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Austria\",\n",
       "                    \"value\": 8766201\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Serbia\",\n",
       "                    \"value\": 8733407\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Switzerland\",\n",
       "                    \"value\": 8608259\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Papua New Guinea\",\n",
       "                    \"value\": 8586525\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Israel\",\n",
       "                    \"value\": 8583916\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Togo\",\n",
       "                    \"value\": 8186384\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Sierra Leone\",\n",
       "                    \"value\": 7883123\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Hong Kong\",\n",
       "                    \"value\": 7490776\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Laos\",\n",
       "                    \"value\": 7064242\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bulgaria\",\n",
       "                    \"value\": 6988739\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Paraguay\",\n",
       "                    \"value\": 6981981\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Libya\",\n",
       "                    \"value\": 6569864\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"El Salvador\",\n",
       "                    \"value\": 6445405\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Nicaragua\",\n",
       "                    \"value\": 6351157\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Kyrgyzstan\",\n",
       "                    \"value\": 6218616\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Lebanon\",\n",
       "                    \"value\": 6065922\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Turkmenistan\",\n",
       "                    \"value\": 5942561\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Singapore\",\n",
       "                    \"value\": 5868104\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Denmark\",\n",
       "                    \"value\": 5775224\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Finland\",\n",
       "                    \"value\": 5561389\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Congo\",\n",
       "                    \"value\": 5542197\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Slovakia\",\n",
       "                    \"value\": 5450987\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Norway\",\n",
       "                    \"value\": 5400916\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Eritrea\",\n",
       "                    \"value\": 5309659\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"State of Palestine\",\n",
       "                    \"value\": 5186790\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Oman\",\n",
       "                    \"value\": 5001875\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Costa Rica\",\n",
       "                    \"value\": 4999384\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Liberia\",\n",
       "                    \"value\": 4977720\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Ireland\",\n",
       "                    \"value\": 4847139\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Central African Republic\",\n",
       "                    \"value\": 4825711\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"New Zealand\",\n",
       "                    \"value\": 4792409\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Mauritania\",\n",
       "                    \"value\": 4661149\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Kuwait\",\n",
       "                    \"value\": 4248974\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Panama\",\n",
       "                    \"value\": 4226197\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Croatia\",\n",
       "                    \"value\": 4140148\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Moldova\",\n",
       "                    \"value\": 4029750\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Georgia\",\n",
       "                    \"value\": 3904204\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Puerto Rico\",\n",
       "                    \"value\": 3654978\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bosnia and Herzegovina\",\n",
       "                    \"value\": 3501774\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Uruguay\",\n",
       "                    \"value\": 3482156\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Mongolia\",\n",
       "                    \"value\": 3166244\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Albania\",\n",
       "                    \"value\": 2938428\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Armenia\",\n",
       "                    \"value\": 2936706\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Jamaica\",\n",
       "                    \"value\": 2906339\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Lithuania\",\n",
       "                    \"value\": 2864459\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Qatar\",\n",
       "                    \"value\": 2743901\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Namibia\",\n",
       "                    \"value\": 2641996\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Botswana\",\n",
       "                    \"value\": 2374636\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Lesotho\",\n",
       "                    \"value\": 2292682\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Gambia\",\n",
       "                    \"value\": 2228075\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Gabon\",\n",
       "                    \"value\": 2109099\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"North Macedonia\",\n",
       "                    \"value\": 2086720\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Slovenia\",\n",
       "                    \"value\": 2081900\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Guinea-Bissau\",\n",
       "                    \"value\": 1953723\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Latvia\",\n",
       "                    \"value\": 1911108\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bahrain\",\n",
       "                    \"value\": 1637896\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Swaziland\",\n",
       "                    \"value\": 1415414\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Trinidad and Tobago\",\n",
       "                    \"value\": 1375443\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Equatorial Guinea\",\n",
       "                    \"value\": 1360104\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Timor-Leste\",\n",
       "                    \"value\": 1352360\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Estonia\",\n",
       "                    \"value\": 1303798\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Mauritius\",\n",
       "                    \"value\": 1271368\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cyprus\",\n",
       "                    \"value\": 1198427\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Djibouti\",\n",
       "                    \"value\": 985690\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Fiji\",\n",
       "                    \"value\": 918757\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"R\\u00e9union\",\n",
       "                    \"value\": 889918\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Comoros\",\n",
       "                    \"value\": 850910\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bhutan\",\n",
       "                    \"value\": 826229\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Guyana\",\n",
       "                    \"value\": 786508\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Macao\",\n",
       "                    \"value\": 642090\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Solomon Islands\",\n",
       "                    \"value\": 635254\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Montenegro\",\n",
       "                    \"value\": 629355\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Luxembourg\",\n",
       "                    \"value\": 596992\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Western Sahara\",\n",
       "                    \"value\": 582478\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Suriname\",\n",
       "                    \"value\": 573085\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cabo Verde\",\n",
       "                    \"value\": 560349\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Micronesia\",\n",
       "                    \"value\": 536579\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Maldives\",\n",
       "                    \"value\": 451738\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Guadeloupe\",\n",
       "                    \"value\": 448798\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Brunei\",\n",
       "                    \"value\": 439336\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Malta\",\n",
       "                    \"value\": 433245\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bahamas\",\n",
       "                    \"value\": 403095\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Belize\",\n",
       "                    \"value\": 390231\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Martinique\",\n",
       "                    \"value\": 385320\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Iceland\",\n",
       "                    \"value\": 340566\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"French Guiana\",\n",
       "                    \"value\": 296847\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"French Polynesia\",\n",
       "                    \"value\": 288506\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Vanuatu\",\n",
       "                    \"value\": 288017\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Barbados\",\n",
       "                    \"value\": 287010\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"New Caledonia\",\n",
       "                    \"value\": 283376\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Mayotte\",\n",
       "                    \"value\": 266380\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Sao Tome & Principe\",\n",
       "                    \"value\": 213379\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Samoa\",\n",
       "                    \"value\": 198909\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Saint Lucia\",\n",
       "                    \"value\": 180454\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Guam\",\n",
       "                    \"value\": 167245\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Channel Islands\",\n",
       "                    \"value\": 166828\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cura\\u00e7ao\",\n",
       "                    \"value\": 162547\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Kiribati\",\n",
       "                    \"value\": 120428\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"St. Vincent & Grenadines\",\n",
       "                    \"value\": 110488\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Tonga\",\n",
       "                    \"value\": 110041\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Grenada\",\n",
       "                    \"value\": 108825\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Aruba\",\n",
       "                    \"value\": 106053\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"U.S. Virgin Islands\",\n",
       "                    \"value\": 104909\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Antigua and Barbuda\",\n",
       "                    \"value\": 104084\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Seychelles\",\n",
       "                    \"value\": 95702\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Isle of Man\",\n",
       "                    \"value\": 85369\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Andorra\",\n",
       "                    \"value\": 77072\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Dominica\",\n",
       "                    \"value\": 74679\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cayman Islands\",\n",
       "                    \"value\": 63129\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bermuda\",\n",
       "                    \"value\": 60833\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Greenland\",\n",
       "                    \"value\": 56673\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Saint Kitts & Nevis\",\n",
       "                    \"value\": 56345\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"American Samoa\",\n",
       "                    \"value\": 55727\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Northern Mariana Islands\",\n",
       "                    \"value\": 55246\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Marshall Islands\",\n",
       "                    \"value\": 53211\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Faeroe Islands\",\n",
       "                    \"value\": 49692\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Sint Maarten\",\n",
       "                    \"value\": 40939\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Monaco\",\n",
       "                    \"value\": 39102\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Liechtenstein\",\n",
       "                    \"value\": 38404\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Turks and Caicos\",\n",
       "                    \"value\": 36461\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Gibraltar\",\n",
       "                    \"value\": 34879\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"San Marino\",\n",
       "                    \"value\": 33683\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"British Virgin Islands\",\n",
       "                    \"value\": 32206\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Caribbean Netherlands\",\n",
       "                    \"value\": 25971\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Palau\",\n",
       "                    \"value\": 22206\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cook Islands\",\n",
       "                    \"value\": 17462\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Anguilla\",\n",
       "                    \"value\": 15174\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Wallis & Futuna\",\n",
       "                    \"value\": 11617\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Tuvalu\",\n",
       "                    \"value\": 11393\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Nauru\",\n",
       "                    \"value\": 11260\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Saint Pierre & Miquelon\",\n",
       "                    \"value\": 6375\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Montserrat\",\n",
       "                    \"value\": 5220\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Saint Helena\",\n",
       "                    \"value\": 4096\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Falkland Islands\",\n",
       "                    \"value\": 2921\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Niue\",\n",
       "                    \"value\": 1628\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Tokelau\",\n",
       "                    \"value\": 1340\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Holy See\",\n",
       "                    \"value\": 799\n",
       "                }\n",
       "            ],\n",
       "            \"roam\": true,\n",
       "            \"aspectScale\": 0.75,\n",
       "            \"nameProperty\": \"name\",\n",
       "            \"selectedMode\": false,\n",
       "            \"zoom\": 1,\n",
       "            \"mapValueCalculation\": \"sum\",\n",
       "            \"showLegendSymbol\": false,\n",
       "            \"emphasis\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u4e16\\u754c\\u4eba\\u53e3\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u4e16\\u754c\\u4eba\\u53e3\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 799,\n",
       "        \"max\": 1420062022,\n",
       "        \"text\": [\n",
       "            \"Max\",\n",
       "            \"Min\"\n",
       "        ],\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"lightskyblue\",\n",
       "                \"yellow\",\n",
       "                \"orange\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "        mapChart_668416b569964732b2e8872cf0e397b9.setOption(mapOption_668416b569964732b2e8872cf0e397b9);\n",
       "    \tvar chart_668416b569964732b2e8872cf0e397b9 = echarts.init(\n",
       "            document.getElementById('668416b569964732b2e8872cf0e397b9'), 'white', {renderer: 'canvas'});\n",
       "\t    var option_668416b569964732b2e8872cf0e397b9 = {\n",
       "           \"globe\": {\n",
       "           \"show\": true,\n",
       "\t\t   \"baseTexture\": mapChart_668416b569964732b2e8872cf0e397b9,\n",
       "           shading: 'lambert',\n",
       "            light: {\n",
       "                ambient: {\n",
       "                    intensity: 0.6\n",
       "                },\n",
       "                main: {\n",
       "                    intensity: 0.2\n",
       "                }\n",
       "             }\n",
       "\n",
       "\t\t   }};\n",
       "        chart_668416b569964732b2e8872cf0e397b9.setOption(option_668416b569964732b2e8872cf0e397b9);\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x2378b15ed60>"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c = (\n",
    "    MapGlobe()\n",
    "    .add_schema()\n",
    "    .add(\n",
    "        maptype='world',\n",
    "        series_name='世界人口',\n",
    "        data_pair=POPULATION[1:], # 人口数据\n",
    "        \n",
    "        is_map_symbol_show=False, # 地图中各个国家的符号是否显示\n",
    "        label_opts=opts.LabelOpts(is_show=False)  # 显示国家名称\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        visualmap_opts=opts.VisualMapOpts(\n",
    "            min_=low,\n",
    "            max_=high,\n",
    "            range_text=['Max', 'Min'],\n",
    "            is_calculable=True,\n",
    "            range_color=['lightskyblue', 'yellow', 'orange']\n",
    "        )\n",
    "    )\n",
    ")\n",
    "c.render_notebook()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
